import instance from "./requirest";

//获取分类列表数据
export let http_gettypelist = () => {
    return instance.get('/typelist')
}

//获取购物车数据
export let http_getshoplist = () => {
    return instance.get('/shoplist')
}

//存放购车页面的数据
export let http_getcarlist = () => {
    return instance.get('/carlist')
}

//添加数据到购物车
export let http_addcarlist = (obj) => {
    return instance.post('/carlist', obj)
}
//编辑购物车数据
export let http_updatecarlist = (obj) => {
    return instance.patch(`/carlist/${obj.id}`, obj)
}